-- GENERATED SPELL FOR [Valiance Commando] --


function spell0_31414(pUnit, Event) --@Deterrence,Self--
pUnit:FullCastSpellOnTarget(31567,pUnit)
pUnit:RegisterEvent('Sorts_31414', 10348, 1)
end

function spell1_31414(pUnit, Event) --@Puncture Armor,n/a--
pUnit:FullCastSpellOnTarget(35918,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_31414', 30254, 1)
end

function spell2_31414(pUnit, Event) --@Shoot,n/a--
pUnit:FullCastSpellOnTarget(15547,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_31414', 568, 1)
end

function Sorts_31414(pUnit, Event)
local choix_sorts_31414 = math.random(0, 2)
if choix_sorts_31414 == 0 then
pUnit:RegisterEvent('spell0_31414', 1, 1)
end
if choix_sorts_31414 == 1 then
pUnit:RegisterEvent('spell1_31414', 1, 1)
end
if choix_sorts_31414 == 2 then
pUnit:RegisterEvent('spell2_31414', 1, 1)
end
end

function mob31414_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_31414', math.random(1500, 3000), 1)
end

function mob31414_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob31414_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob31414_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(31414, 1, 'mob31414_Action')
RegisterUnitEvent(31414, 2, 'mob31414_Leave')
RegisterUnitEvent(31414, 3, 'mob31414_Kill')
RegisterUnitEvent(31414, 4, 'mob31414_Die')
